{% load jsonify %}

<script type="application/javascript">
    template='{{ template }}'
    root_page='{{ root_page }}'
    page_name='{{page_name}}'
    page_label={{ page_label | jsonify | default:'unlabel page'}}
    engine_url='{{engine_url}}'

    can_add={{ can_add | jsonify | default:'false' }}
    can_log={{ can_log | jsonify | default:'false' }}
    can_del={{ can_del | jsonify | default:'false' }}
    can_edit={{ can_edit | jsonify | default:'false' }}

    heads={{ heads | jsonify | default:'[]' }}

    row = {{ row | jsonify | default:'[]' }}

    ops={{ops | jsonify | default:'[]' }}
    row_filters={{row_filters | jsonify | default:'[]' }}
    search_tip = '{{ search_tip |default:""}}'
    row_sort={{row_sort | jsonify | default:'[]' }}

    // only in table
    rows={{ rows | jsonify | default:'[]'}}
    row_pages = {{ row_pages | jsonify | default:'[]'}}

    //
    fieldset={{ fieldset | jsonify }}
    namelist={{ namelist | jsonify | default:'[]' }}
    delset={{ delset | jsonify | default:'[]' }}
    save_step={{ save_step | jsonify | default:'[]' }}

    model_name='{{ model_name }}'
    director_name = '{{ director_name }}'
    app='{{ app }}'
    {% if app  %}
    ajax_url="{% url 'ajax_url' app=app %}"
    {% endif %}

    user='{{ user.pk }}'
    user_name= '{{ user.first_name }}'

    help_url = '{{ help_url |default:""}}'

    table_fun_config= {{ table_fun_config | jsonify }}
    user_msg = {{ user_msg | jsonify | default:'[]' }}
    named_ctx={{ named_ctx | jsonify | default:'{}' }}

    js_config={{js_config | jsonify }}



</script>

